<template>
  <div class="title_box">
    <div class="title">
      {{ title }}
    </div>
    <div
      style="margin-top: 12px"
      v-if="content"
      class="v-html"
      v-html="content"
    ></div>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "NavBar",
  props: {
    title: {
      type: String,
      default: "标题",
    },
    content: {
      type: String,
      default: "",
    },
  },
  setup() {
    const state = reactive({});
    return { ...toRefs(state) };
  },
});
</script>
<style lang="scss" scoped>
.title_box {
  .title {
    position: relative;
    padding-left: 10px;
    box-sizing: border-box;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    border-bottom: 1px solid #ededed;
    padding-bottom: 10px;
    &::after {
      content: "";
      background-color: #333333;
      position: absolute;
      left: 0;
      height: 16px;
      width: 4px;
      top: 50%;
      margin-top: -13px;
    }
  }
}
</style>
